import { RedisModule } from '@common/reids/redis.module';
import { MyWebSocketGateway } from './web-socket.gateway';
import { Module, forwardRef } from '@nestjs/common';
import { DatabaseModule } from '@common/database/database.module';
import { EntityProviders } from '@common/database/entity.provider';
import { SocketModule } from './socket/socket.module';
import { WebSocketController } from './web-socket.controller';
import { WebSocketService } from './web-socket.service';
import { UserModule } from '@game/user/user.module';
import { RoomModule } from './room/room.module';
import { RebotModule } from './rebot/rebot.module';

@Module({
  imports: [DatabaseModule, RedisModule, SocketModule, UserModule, RoomModule,forwardRef(()=>RebotModule)],
  controllers: [WebSocketController],
  providers: [MyWebSocketGateway, ...EntityProviders, WebSocketService],
  exports:[MyWebSocketGateway,WebSocketService]
})
export class WebSocketGatewayModule {}
